import { nanoid } from "nanoid";


export default function getUserTempId(){
    //如果本地中有就返回
    let userTempId = localStorage.getItem("userTempId")
    if(userTempId) return userTempId

    //如果没有就添加到本地并返回
    userTempId = nanoid()
    localStorage.setItem("userTempId" , userTempId)
    return userTempId

}